//
// Created by PC on 2022/12/20.
//

#include <vector>
#include <iostream>
#include "arrUtil.h"
using namespace std;

void insert(int arr[], int len)
{
    for (int i = 0; i < len; ++i)
    {
        int j = i;
        int cur = arr[j];
        while(j>0 && cur<arr[j-1])
        {
            arr[j]=arr[j-1];
            j--;
        }
        arr[j]=cur;

    }

}

int main()
{
    int l = 20;
    int a[l];
    randomArr(a,l);
    insert(a,l);
    printArr(a,l);
    printf("%d",checkSort(a,l));


}